import request from "@/utils/request";
// 获取所有有权限用户
export const get_AuthAllUser = (params) => {
    return request.get("/authRole/allUserRole/", {params});
};

// 搜索用户
export const search_AuthAllUser = (params) => {
    return request.post("/authRole/searchUserRole/", params);
};

// 获取所有用户
export const get_allUser = (params) => {
    return request.get("/authRole/allUser/", {params});
};

// 获取角色列表
export const get_allRole = (params) => {
    return request.get("/authRole/allRole/", {params});
};
//添加用户权限
export const addUserRole = (params) => {
    return request.post("/authRole/addUserRole/", params);
};
// 更新用户权限
export const updateUserRole = (params) => {
    return request.post("/authRole/updateUserRole/", params);
};
//删除用户权限
export const delUserRole = (params) => {
    return request.post("/authRole/delUserRole/", params);
};

//获取所有角色
export const get_RoleAll = (params) => {
    return request.get("/authRole/getRoleAll/", {params});
};

//添加角色
export const updateRole = (params) => {
    return request.post("/authRole/updateRole/", params);
};

// 更新角色
export const addRole = (params) => {
    return request.post("/authRole/addRole/", params);
};
// 删除角色
export const delRole = (params) => {
    return request.post("/authRole/delRole/", params);
}
// 获取所有菜单
export const get_menus = (params) => {
    return request.post("/authRole/getAllMenus/", params);
};

//根据角色查询所有的菜单权限
export const FindUserMenu = (params) => {
    return request.post("/authRole/findUserMenus/", params);
}

//更新角色菜单权限
export const updateUserMenus = (params) => {
    return request.post('/authRole/updateRoleMenus/', params)
}

//添加菜单
export const addMenus = (params) => {
    return request.post("/authRole/addMenus/", params);
}
//更新菜单
export const updateMenus = (params) => {
    return request.post("/authRole/updateMenus/", params);
}

//删除菜单
export const delMenus = (params) => {
    return request.post("/authRole/delMenus/", params);
}